
#include"ThreadPool.hpp"
#include"Task.hpp"
#include<memory>

using namespace ThreadPoolModel;
using task_t = std::function<void()>;

int main()
{
    ENABLECONSOLELOG();
    int cnt = 10;
    ThreadPool<task_t>::GetInstance()->Start();
    while (cnt)
    {
        ThreadPool<task_t>::GetInstance()->Enqueue(push);
        sleep(1);
        cnt--;
    }
    ThreadPool<task_t>::GetInstance()->Stop();

    sleep(5);
    ThreadPool<task_t>::GetInstance()->Wait();


    return 0;
}